define(['qb'],function(){
    class Mesall {
        constructor() {
            this.ul0 = document.querySelector('.btms')
            this.ri = document.querySelector('.rightss')
            this.lists=lists
            this.creat()
            this.zhuanhuan()
        }
        creat() {
            var str=
            this.str=''
            var res=[]
            for(let j=0;j<5;j++){
                var x=Math.round(Math.random()*38+1)
                res.push(x)
            }
            for (let i = 0; i < 5; i++) {
               this.str += `
                
                <div class="book">
                <div class="pic">
                <img src="${this.lists[res[i]].url}">
                <div class="num">
                 <span class="iconfont icon-18erji-2"></span>
                  <span>${this.lists[res[i]].num}</span>
                </div>
                </div>
                <p>${this.lists[res[i]].title}</p>
                <span>${this.lists[res[i]].pyr}</span>      
                </div>
                
                `
            }
            // this.str=this.str+'</ul>'
            this.ul0.innerHTML=this.str
        }
        zhuanhuan(){
            
            this.ri.onclick=()=>{
                this.creat()
            }
        }
    }
    new Mesall()
});